/* Stellarium Web Engine - Copyright (c) 2022 - Stellarium Labs SRL
 *
 * This program is licensed under the terms of the GNU AGPL v3, or
 * alternatively under a commercial licence.
 *
 * The terms of the AGPL v3 license can be found in the main directory of this
 * repository.
 */

#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

#include "utils/vec.h"
#include "erfa_wrap.h"

struct cst {
    const char id[5];
    double center[2];
    double size[2];
    int n;
    const double (*points)[2];
};

// Data taken from Vizier catalog VI/49.
static const struct cst CSTS[] = {
    {
        "AND",
        {0.153958331446, 0.690512376568},
        {1.00980866769, 0.647986467298},
        37,
        (const double[][2]) {
            {5.98648020701, 0.602138591938},
            {5.98648020701, 0.916297857297},
            {6.10865150932, 0.916297857297},
            {6.10865150932, 0.872664625997},
            {6.17410135627, 0.872664625997},
            {6.17410135627, 0.837758040957},
            {0.0436341039645, 0.837758040957},
            {0.0436341039645, 0.802851455917},
            {0.226893675424, 0.802851455917},
            {0.226893675424, 0.837758040957},
            {0.292343522374, 0.837758040957},
            {0.292343522374, 0.872664625997},
            {0.357793369323, 0.872664625997},
            {0.436333185663, 0.872664625997},
            {0.436333185663, 0.820304748437},
            {0.534507956088, 0.820304748437},
            {0.534507956088, 0.881391272257},
            {0.658862665292, 0.881391272257},
            {0.658862665292, 0.641408500108},
            {0.523598775598, 0.641408500108},
            {0.523598775598, 0.610865238198},
            {0.368699931819, 0.610865238198},
            {0.368699931819, 0.575958653158},
            {0.187623767254, 0.575958653158},
            {0.187623767254, 0.414515697349},
            {0.222529479629, 0.414515697349},
            {0.222529479629, 0.366519142919},
            {0.0370891192695, 0.366519142919},
            {0.0370891192695, 0.383972435439},
            {0.0174541651846, 0.383972435439},
            {0.0174541651846, 0.488692190558},
            {0.0, 0.488692190558},
            {0.0, 0.546869774114},
            {6.21773546023, 0.546869774114},
            {6.21773546023, 0.559959743504},
            {6.15228561328, 0.559959743504},
            {6.15228561328, 0.602138591938},
        },
    },
    {
        "ANT",
        {2.6751934069, -0.553221228879},
        {0.446009870372, 0.281094297577},
        13,
        (const double[][2]) {
            {2.45218847172, -0.418879020479},
            {2.45218847172, -0.641408500108},
            {2.45218847172, -0.693768377668},
            {2.87979326579, -0.693768377668},
            {2.87979326579, -0.610865238198},
            {2.83615916183, -0.610865238198},
            {2.83615916183, -0.543961008383},
            {2.77070931488, -0.543961008383},
            {2.77070931488, -0.509054423343},
            {2.68344372494, -0.509054423343},
            {2.68344372494, -0.462512251778},
            {2.55254403104, -0.462512251778},
            {2.55254403104, -0.418879020479},
        },
    },
    {
        "APS",
        {4.26072129806, -1.29871869464},
        {1.36559091762, 0.282355876502},
        10,
        (const double[][2]) {
            {3.57792583925, -1.4398966329},
            {4.71238898038, -1.4398966329},
            {4.71238898038, -1.308996939},
            {4.71238898038, -1.1780972451},
            {4.58148928649, -1.1780972451},
            {4.45058959259, -1.1780972451},
            {4.45058959259, -1.2217304764},
            {3.86154097004, -1.2217304764},
            {3.57792583925, -1.2217304764},
            {3.57792583925, -1.308996939},
        },
    },
    {
        "AQL",
        {5.08775038981, 0.0833089391454},
        {0.57572566733, 0.586660335249},
        24,
        (const double[][2]) {
            {4.86510441727, 0.0},
            {4.86510441727, 0.0349065850399},
            {4.93928265581, 0.0349065850399},
            {4.93928265581, 0.10908307825},
            {4.88575777097, 0.10908307825},
            {4.88575777097, 0.209439510239},
            {4.93928265581, 0.209439510239},
            {4.93928265581, 0.322885911619},
            {4.97418836818, 0.322885911619},
            {4.97418836818, 0.282161620583},
            {5.19235365202, 0.282161620583},
            {5.19235365202, 0.274889357189},
            {5.27307687525, 0.274889357189},
            {5.27307687525, 0.14835298642},
            {5.31452757232, 0.14835298642},
            {5.31452757232, 0.0349065850399},
            {5.37561322348, 0.0349065850399},
            {5.37561322348, 0.0},
            {5.37561322348, -0.157079632679},
            {5.23598775598, -0.157079632679},
            {5.23598775598, -0.210021228479},
            {4.93928265581, -0.210021228479},
            {4.93928265581, -0.0698131700798},
            {4.86510441727, -0.0698131700798},
        },
    },
    {
        "AQR",
        {5.72934031866, -0.0995012992082},
        {1.0204217691, 0.691115320101},
        23,
        (const double[][2]) {
            {5.37561322348, 0.0},
            {5.37561322348, 0.0349065850399},
            {5.45415303982, 0.0349065850399},
            {5.58505273372, 0.0349065850399},
            {5.61996106409, 0.0349065850399},
            {5.61996106409, 0.0479965544298},
            {5.67232094165, 0.0479965544298},
            {5.67232094165, 0.0305432619099},
            {5.75958653158, 0.0305432619099},
            {5.75958653158, 0.0349065850399},
            {5.95593607243, 0.0349065850399},
            {5.95593607243, 0.0},
            {5.95593607243, -0.0698131700798},
            {6.23955120322, -0.0698131700798},
            {6.23955120322, -0.12217304764},
            {6.23955120322, -0.445058959259},
            {6.02138591938, -0.445058959259},
            {5.72468081921, -0.445058959259},
            {5.72468081921, -0.157079632679},
            {5.58505273372, -0.157079632679},
            {5.58505273372, -0.261799387799},
            {5.37561322348, -0.261799387799},
            {5.37561322348, -0.157079632679},
        },
    },
    {
        "ARA",
        {4.47037349786, -1.04385977994},
        {0.48403096504, 0.499469940574},
        15,
        (const double[][2]) {
            {4.29896324115, -1.0471975512},
            {4.29896324115, -0.794124809657},
            {4.66875487642, -0.794124809657},
            {4.71238898038, -0.794124809657},
            {4.71238898038, -0.994837673637},
            {4.58148928649, -0.994837673637},
            {4.58148928649, -1.1780972451},
            {4.45058959259, -1.1780972451},
            {4.40695548862, -1.1780972451},
            {4.40695548862, -1.1344640138},
            {4.38513974564, -1.1344640138},
            {4.38513974564, -1.10973845788},
            {4.34150564167, -1.10973845788},
            {4.34150564167, -1.06465084372},
            {4.29896324115, -1.06465084372},
        },
    },
    {
        "ARI",
        {0.654396312004, 0.389767404767},
        {0.453991665836, 0.433377724866},
        12,
        (const double[][2]) {
            {0.523598775598, 0.173078542334},
            {0.436333185663, 0.173078542334},
            {0.436333185663, 0.436332312999},
            {0.501783032613, 0.436332312999},
            {0.501783032613, 0.475602221168},
            {0.632682726513, 0.475602221168},
            {0.632682726513, 0.535234362123},
            {0.711222542852, 0.535234362123},
            {0.881392144922, 0.535234362123},
            {0.881392144922, 0.331612557879},
            {0.859573783943, 0.331612557879},
            {0.859573783943, 0.173078542334},
        },
    },
    {
        "AUR",
        {1.49640619956, 0.73203060291},
        {0.864366993114, 0.490707556414},
        21,
        (const double[][2]) {
            {1.1780972451, 0.535234362123},
            {1.1780972451, 0.628318530718},
            {1.22827633376, 0.628318530718},
            {1.22827633376, 0.916297857297},
            {1.308996939, 0.916297857297},
            {1.308996939, 0.977384381117},
            {1.59697626557, 0.977384381117},
            {1.59697626557, 0.942477796077},
            {1.70169602069, 0.942477796077},
            {1.70169602069, 0.872664625997},
            {1.78023583703, 0.872664625997},
            {1.78023583703, 0.776671517137},
            {1.92858969612, 0.776671517137},
            {1.92858969612, 0.619591884458},
            {1.71042179429, 0.619591884458},
            {1.71042179429, 0.488692190558},
            {1.54025219222, 0.488692190558},
            {1.54025219222, 0.497418836818},
            {1.24354709205, 0.497418836818},
            {1.24354709205, 0.523598775598},
            {1.1780972451, 0.523598775598},
        },
    },
    {
        "BOO",
        {3.83578455534, 0.639754340599},
        {0.602985640096, 1.00025600088},
        20,
        (const double[][2]) {
            {3.94880655997, 0.13962634016},
            {3.53429173529, 0.13962634016},
            {3.53429173529, 0.261799387799},
            {3.53429173529, 0.497418836818},
            {3.6542822487, 0.497418836818},
            {3.6542822487, 0.536688744988},
            {3.67391720278, 0.536688744988},
            {3.67391720278, 0.846484687217},
            {3.67391720278, 0.968657734857},
            {3.7742753801, 0.968657734857},
            {3.99244066394, 0.968657734857},
            {3.99244066394, 0.925024503557},
            {4.12334035784, 0.925024503557},
            {4.12334035784, 0.898844564777},
            {4.12334035784, 0.698131700798},
            {4.0404363457, 0.698131700798},
            {4.0404363457, 0.575958653158},
            {3.97498649875, 0.575958653158},
            {3.97498649875, 0.453785605519},
            {3.94880655997, 0.453785605519},
        },
    },
    {
        "CAE",
        {1.2153180004, -0.665189841971},
        {0.196612812919, 0.380042983013},
        14,
        (const double[][2]) {
            {1.11701159394, -0.698131700798},
            {1.11701159394, -0.855211333477},
            {1.1780972451, -0.855211333477},
            {1.1780972451, -0.811578102177},
            {1.26536283503, -0.811578102177},
            {1.26536283503, -0.750491578358},
            {1.308996939, -0.750491578358},
            {1.308996939, -0.475602221168},
            {1.26536283503, -0.475602221168},
            {1.23045712266, -0.475602221168},
            {1.23045712266, -0.523598775598},
            {1.19991298808, -0.523598775598},
            {1.19991298808, -0.645771823238},
            {1.11701159394, -0.645771823238},
        },
    },
    {
        "CAM",
        {1.46705983722, 1.32002637729},
        {4.65806257174, 0.807457039991},
        34,
        (const double[][2]) {
            {1.59697626557, 0.977384381117},
            {1.308996939, 0.977384381117},
            {1.308996939, 0.916297857297},
            {1.22827633376, 0.916297857297},
            {0.872663753333, 0.916297857297},
            {0.872663753333, 0.959931088597},
            {0.829032267362, 0.959931088597},
            {0.829032267362, 0.994837673637},
            {0.811578102177, 0.994837673637},
            {0.811578102177, 1.18682389136},
            {0.894482114312, 1.18682389136},
            {0.894482114312, 1.34390352404},
            {0.918478646197, 1.34390352404},
            {0.918478646197, 1.3962634016},
            {1.308996939, 1.3962634016},
            {1.308996939, 1.4835298642},
            {2.09439510239, 1.4835298642},
            {2.09439510239, 1.50970980298},
            {3.79609112309, 1.50970980298},
            {3.79609112309, 1.3962634016},
            {3.55610747827, 1.3962634016},
            {3.55610747827, 1.34390352404},
            {3.40339204139, 1.34390352404},
            {3.01069295969, 1.34390352404},
            {3.01069295969, 1.3962634016},
            {2.79252767586, 1.3962634016},
            {2.79252767586, 1.43116998664},
            {2.39982859416, 1.43116998664},
            {2.39982859416, 1.28281700022},
            {2.0856693288, 1.28281700022},
            {2.0856693288, 1.0471975512},
            {1.83259571459, 1.0471975512},
            {1.83259571459, 1.08210413624},
            {1.59697626557, 1.08210413624},
        },
    },
    {
        "CAP",
        {5.46386510152, -0.314472410415},
        {0.521631435374, 0.348439560286},
        12,
        (const double[][2]) {
            {5.37561322348, -0.157079632679},
            {5.23598775598, -0.157079632679},
            {5.23598775598, -0.210021228479},
            {5.23598775598, -0.488692190558},
            {5.32325334592, -0.488692190558},
            {5.58505273372, -0.488692190558},
            {5.58505273372, -0.445058959259},
            {5.72468081921, -0.445058959259},
            {5.72468081921, -0.157079632679},
            {5.58505273372, -0.157079632679},
            {5.58505273372, -0.261799387799},
            {5.37561322348, -0.261799387799},
        },
    },
    {
        "CAR",
        {2.10168186765, -1.04985082479},
        {1.68712249018, 0.518292228415},
        21,
        (const double[][2]) {
            {2.94524311274, -0.986111027377},
            {2.87979326579, -0.986111027377},
            {2.31256038623, -0.986111027377},
            {2.31256038623, -0.951204442337},
            {2.2122048269, -0.951204442337},
            {2.2122048269, -0.925024503557},
            {2.13802920636, -0.925024503557},
            {2.13802920636, -0.885754595387},
            {2.09439510239, -0.885754595387},
            {1.57079632679, -0.885754595387},
            {1.57079632679, -0.916297857297},
            {1.61443043076, -0.916297857297},
            {1.61443043076, -0.959931088597},
            {1.70169602069, -0.959931088597},
            {1.70169602069, -1.01229096616},
            {1.78896161063, -1.01229096616},
            {1.78896161063, -1.11701072128},
            {2.36492026379, -1.11701072128},
            {2.36492026379, -1.308996939},
            {2.94524311274, -1.308996939},
            {2.94524311274, -1.11701072128},
        },
    },
    {
        "CAS",
        {0.181262610682, 1.02140329382},
        {1.42643900726, 0.645000460422},
        31,
        (const double[][2]) {
            {5.98648020701, 0.916297857297},
            {5.98648020701, 0.981747704247},
            {5.98648020701, 1.03119864154},
            {6.06502002334, 1.03119864154},
            {6.06502002334, 1.09955742876},
            {6.17410135627, 1.09955742876},
            {6.17410135627, 1.15191730632},
            {0.0872655899351, 1.15191730632},
            {0.0872655899351, 1.34390352404},
            {0.894482114312, 1.34390352404},
            {0.894482114312, 1.18682389136},
            {0.811578102177, 1.18682389136},
            {0.811578102177, 0.994837673637},
            {0.637044304313, 0.994837673637},
            {0.637044304313, 1.02101761242},
            {0.499599625719, 1.02101761242},
            {0.499599625719, 1.0035643199},
            {0.445058959259, 1.0035643199},
            {0.445058959259, 0.942477796077},
            {0.357793369323, 0.942477796077},
            {0.357793369323, 0.872664625997},
            {0.292343522374, 0.872664625997},
            {0.292343522374, 0.837758040957},
            {0.226893675424, 0.837758040957},
            {0.226893675424, 0.802851455917},
            {0.0436341039645, 0.802851455917},
            {0.0436341039645, 0.837758040957},
            {6.17410135627, 0.837758040957},
            {6.17410135627, 0.872664625997},
            {6.10865150932, 0.872664625997},
            {6.10865150932, 0.916297857297},
        },
    },
    {
        "CEN",
        {3.34210129266, -0.879949409489},
        {1.12614756268, 0.730154560301},
        20,
        (const double[][2]) {
            {2.87979326579, -0.610865238198},
            {2.87979326579, -0.693768377668},
            {2.87979326579, -0.986111027377},
            {2.94524311274, -0.986111027377},
            {2.94524311274, -1.11701072128},
            {3.09795854963, -1.11701072128},
            {3.09795854963, -0.959931088597},
            {3.35975793742, -0.959931088597},
            {3.35975793742, -1.11701072128},
            {3.53429173529, -1.11701072128},
            {3.80481689668, -1.11701072128},
            {3.80481689668, -0.959931088597},
            {3.70882553315, -0.959931088597},
            {3.70882553315, -0.733038285838},
            {3.905175074, -0.733038285838},
            {3.905175074, -0.514872129338},
            {3.29430809047, -0.514872129338},
            {3.29430809047, -0.575958653158},
            {3.20704250054, -0.575958653158},
            {3.20704250054, -0.610865238198},
        },
    },
    {
        "CEP",
        {5.78173982299, 1.25740360668},
        {5.19168117316, 0.673484852501},
        39,
        (const double[][2]) {
            {5.23598775598, 1.03847090494},
            {5.23598775598, 1.07337748998},
            {5.3450717069, 1.07337748998},
            {5.3450717069, 1.16937059884},
            {5.41052155385, 1.16937059884},
            {5.41052155385, 1.308996939},
            {5.27962185995, 1.308996939},
            {5.27962185995, 1.3962634016},
            {5.49778714378, 1.3962634016},
            {5.49778714378, 1.50098315672},
            {5.49778714378, 1.50389192245},
            {6.02138591938, 1.50389192245},
            {6.02138591938, 1.53588974176},
            {2.09439510239, 1.53588974176},
            {2.09439510239, 1.50970980298},
            {2.09439510239, 1.4835298642},
            {1.308996939, 1.4835298642},
            {1.308996939, 1.3962634016},
            {0.918478646197, 1.3962634016},
            {0.918478646197, 1.34390352404},
            {0.894482114312, 1.34390352404},
            {0.0872655899351, 1.34390352404},
            {0.0872655899351, 1.15191730632},
            {6.17410135627, 1.15191730632},
            {6.17410135627, 1.09955742876},
            {6.06502002334, 1.09955742876},
            {6.06502002334, 1.03119864154},
            {5.98648020701, 1.03119864154},
            {5.98648020701, 0.981747704247},
            {5.84249054372, 0.981747704247},
            {5.84249054372, 0.959931088597},
            {5.79449224396, 0.959931088597},
            {5.79449224396, 0.920661180427},
            {5.75086075799, 0.920661180427},
            {5.75086075799, 0.957022148333},
            {5.39306738866, 0.957022148333},
            {5.39306738866, 1.06319646085},
            {5.37648763343, 1.06319646085},
            {5.37648763343, 1.03847090494},
        },
    },
    {
        "CET",
        {0.435303528354, -0.122121724101},
        {0.957875264637, 0.645874470315},
        14,
        (const double[][2]) {
            {0.0872655899351, 0.0},
            {0.0872655899351, 0.0349065850399},
            {0.523598775598, 0.0349065850399},
            {0.523598775598, 0.173078542334},
            {0.859573783943, 0.173078542334},
            {0.859573783943, 0.0},
            {0.859573783943, -0.0305432619099},
            {0.693768377668, -0.0305432619099},
            {0.693768377668, -0.4255693911},
            {0.436333185663, -0.4255693911},
            {0.436333185663, -0.445058959259},
            {6.23955120322, -0.445058959259},
            {6.23955120322, -0.12217304764},
            {0.0872655899351, -0.12217304764},
        },
    },
    {
        "CHA",
        {2.72739663132, -1.39406779973},
        {1.70105841586, 0.170141721467},
        6,
        (const double[][2]) {
            {2.00712951246, -1.4398966329},
            {3.57792583925, -1.4398966329},
            {3.57792583925, -1.308996939},
            {2.94524311274, -1.308996939},
            {2.36492026379, -1.308996939},
            {2.00712951246, -1.308996939},
        },
    },
    {
        "CIR",
        {3.8435347474, -1.10444940694},
        {0.618486024228, 0.289036636678},
        16,
        (const double[][2]) {
            {3.53429173529, -1.11701072128},
            {3.53429173529, -1.1344640138},
            {3.57792583925, -1.1344640138},
            {3.57792583925, -1.2217304764},
            {3.86154097004, -1.2217304764},
            {3.86154097004, -1.1780972451},
            {3.905175074, -1.1780972451},
            {3.905175074, -1.10973845788},
            {3.97062492095, -1.10973845788},
            {3.97062492095, -1.06465084372},
            {4.01425640692, -1.06465084372},
            {4.01425640692, -1.0471975512},
            {4.01425640692, -0.959931088597},
            {3.94008078638, -0.959931088597},
            {3.80481689668, -0.959931088597},
            {3.80481689668, -1.11701072128},
        },
    },
    {
        "CMA",
        {1.73114144978, -0.435909784098},
        {0.394896492681, 0.487847132757},
        6,
        (const double[][2]) {
            {1.60134046137, -0.191986217719},
            {1.92858969612, -0.191986217719},
            {1.92858969612, -0.575958653158},
            {1.72351176368, -0.575958653158},
            {1.60134046137, -0.575958653158},
            {1.60134046137, -0.475602221168},
        },
    },
    {
        "CMI",
        {1.95575465284, 0.128776735757},
        {0.320912385073, 0.257553471514},
        15,
        (const double[][2]) {
            {2.11621084538, 0.0},
            {1.88495559215, 0.0},
            {1.88495559215, 0.0261799387799},
            {1.83695991039, 0.0261799387799},
            {1.83695991039, 0.0959931088597},
            {1.83259571459, 0.0959931088597},
            {1.83259571459, 0.174532925199},
            {1.83259571459, 0.218166156499},
            {1.96349540849, 0.218166156499},
            {1.96349540849, 0.235619449019},
            {2.04421601373, 0.235619449019},
            {2.04421601373, 0.174532925199},
            {2.07476014831, 0.174532925199},
            {2.07476014831, 0.12217304764},
            {2.11621084538, 0.12217304764},
        },
    },
    {
        "CNC",
        {2.12753043997, 0.31859213421},
        {0.58822779434, 0.532186330415},
        12,
        (const double[][2]) {
            {2.42164433714, 0.12217304764},
            {2.11621084538, 0.12217304764},
            {2.07476014831, 0.12217304764},
            {2.07476014831, 0.174532925199},
            {2.04421601373, 0.174532925199},
            {2.04421601373, 0.235619449019},
            {2.04421601373, 0.349065850399},
            {2.06385096782, 0.349065850399},
            {2.06385096782, 0.488692190558},
            {2.09439510239, 0.488692190558},
            {2.09439510239, 0.584685299418},
            {2.42164433714, 0.584685299418},
        },
    },
    {
        "COL",
        {1.54787999349, -0.628245400305},
        {0.477766108982, 0.305286358273},
        7,
        (const double[][2]) {
            {1.308996939, -0.750491578358},
            {1.308996939, -0.475602221168},
            {1.60134046137, -0.475602221168},
            {1.60134046137, -0.575958653158},
            {1.72351176368, -0.575958653158},
            {1.72351176368, -0.750491578358},
            {1.57079632679, -0.750491578358},
        },
    },
    {
        "COM",
        {3.30865473459, 0.448883381846},
        {0.45127400139, 0.409074573134},
        12,
        (const double[][2]) {
            {3.10668694121, 0.244346095279},
            {3.10668694121, 0.506145483078},
            {3.14159265359, 0.506145483078},
            {3.14159265359, 0.593411945678},
            {3.22885824352, 0.593411945678},
            {3.22885824352, 0.558505360638},
            {3.46884188834, 0.558505360638},
            {3.46884188834, 0.497418836818},
            {3.53429173529, 0.497418836818},
            {3.53429173529, 0.261799387799},
            {3.35975793742, 0.261799387799},
            {3.35975793742, 0.244346095279},
        },
    },
    {
        "CRA",
        {4.81821826817, -0.7416386178},
        {0.399208407958, 0.191733589124},
        5,
        (const double[][2]) {
            {4.66875487642, -0.645771823238},
            {5.01782247215, -0.645771823238},
            {5.01782247215, -0.794124809657},
            {4.71238898038, -0.794124809657},
            {4.66875487642, -0.794124809657},
        },
    },
    {
        "CRB",
        {4.13808687874, 0.55792389533},
        {0.32620075998, 0.280415610935},
        10,
        (const double[][2]) {
            {3.97498649875, 0.453785605519},
            {3.97498649875, 0.575958653158},
            {4.0404363457, 0.575958653158},
            {4.0404363457, 0.698131700798},
            {4.12334035784, 0.698131700798},
            {4.27605579472, 0.698131700798},
            {4.27605579472, 0.471238898038},
            {4.23242430875, 0.471238898038},
            {4.23242430875, 0.453785605519},
            {4.19751597838, 0.453785605519},
        },
    },
    {
        "CRT",
        {2.93651509114, -0.248177828834},
        {0.322886916969, 0.358855675809},
        9,
        (const double[][2]) {
            {2.81434341884, -0.10471975512},
            {2.81434341884, -0.191986217719},
            {2.81434341884, -0.331612557879},
            {2.83615916183, -0.331612557879},
            {2.83615916183, -0.427605666739},
            {3.09795854963, -0.427605666739},
            {3.09795854963, -0.191986217719},
            {3.09795854963, -0.10471975512},
            {3.01505715548, -0.10471975512},
        },
    },
    {
        "CRU",
        {3.22885824352, -1.04222039681},
        {0.261799387799, 0.164578616434},
        4,
        (const double[][2]) {
            {3.09795854963, -0.959931088597},
            {3.09795854963, -1.11701072128},
            {3.35975793742, -1.11701072128},
            {3.35975793742, -0.959931088597},
        },
    },
    {
        "CRV",
        {3.25070816546, -0.336573879086},
        {0.30549923167, 0.289175322733},
        6,
        (const double[][2]) {
            {3.35975793742, -0.191986217719},
            {3.09795854963, -0.191986217719},
            {3.09795854963, -0.427605666739},
            {3.29430809047, -0.427605666739},
            {3.29430809047, -0.383972435439},
            {3.35975793742, -0.383972435439},
        },
    },
    {
        "CVN",
        {3.42364786732, 0.675569358851},
        {0.564110427469, 0.498910289412},
        15,
        (const double[][2]) {
            {3.14159265359, 0.593411945678},
            {3.14159265359, 0.785398163397},
            {3.16340839658, 0.785398163397},
            {3.16340839658, 0.925024503557},
            {3.53429173529, 0.925024503557},
            {3.53429173529, 0.846484687217},
            {3.67391720278, 0.846484687217},
            {3.67391720278, 0.536688744988},
            {3.6542822487, 0.536688744988},
            {3.6542822487, 0.497418836818},
            {3.53429173529, 0.497418836818},
            {3.46884188834, 0.497418836818},
            {3.46884188834, 0.558505360638},
            {3.22885824352, 0.558505360638},
            {3.22885824352, 0.593411945678},
        },
    },
    {
        "CYG",
        {5.33903908035, 0.787491851192},
        {0.823643355275, 0.615052613786},
        33,
        (const double[][2]) {
            {5.04181900403, 0.479965544298},
            {5.04181900403, 0.523598775598},
            {5.06799894281, 0.523598775598},
            {5.06799894281, 0.637045176978},
            {5.0789081233, 0.637045176978},
            {5.0789081233, 0.759218224618},
            {5.01782247215, 0.759218224618},
            {5.01782247215, 0.829031394697},
            {4.99600411117, 0.829031394697},
            {4.99600411117, 0.968657734857},
            {5.0832723191, 0.968657734857},
            {5.0832723191, 1.01229096616},
            {5.17490210483, 1.01229096616},
            {5.17490210483, 1.03847090494},
            {5.23598775598, 1.03847090494},
            {5.37648763343, 1.03847090494},
            {5.37648763343, 1.06319646085},
            {5.39306738866, 1.06319646085},
            {5.39306738866, 0.957022148333},
            {5.75086075799, 0.957022148333},
            {5.75086075799, 0.920661180427},
            {5.75086075799, 0.767944870878},
            {5.7355873817, 0.767944870878},
            {5.7355873817, 0.763581547748},
            {5.72686160811, 0.763581547748},
            {5.72686160811, 0.628318530718},
            {5.68977248884, 0.628318530718},
            {5.68977248884, 0.488692190558},
            {5.6068710947, 0.488692190558},
            {5.4759714008, 0.488692190558},
            {5.4759714008, 0.506145483078},
            {5.14872216605, 0.506145483078},
            {5.14872216605, 0.479965544298},
        },
    },
    {
        "DEL",
        {5.38566717708, 0.19866211185},
        {0.25041987219, 0.327511053621},
        15,
        (const double[][2]) {
            {5.37561322348, 0.0349065850399},
            {5.31452757232, 0.0349065850399},
            {5.31452757232, 0.14835298642},
            {5.27307687525, 0.14835298642},
            {5.27307687525, 0.274889357189},
            {5.30143760293, 0.274889357189},
            {5.30143760293, 0.357792496659},
            {5.38434161507, 0.357792496659},
            {5.38434161507, 0.340339204139},
            {5.51087711317, 0.340339204139},
            {5.51087711317, 0.206530569975},
            {5.46506222031, 0.206530569975},
            {5.46506222031, 0.10471975512},
            {5.45415303982, 0.10471975512},
            {5.45415303982, 0.0349065850399},
        },
    },
    {
        "DOR",
        {1.23097640112, -1.0146449805},
        {0.985070725116, 0.414170991799},
        22,
        (const double[][2]) {
            {1.00356344723, -0.927933443821},
            {1.0471975512, -0.927933443821},
            {1.0471975512, -0.986111027377},
            {1.13446314113, -0.986111027377},
            {1.13446314113, -1.02974425868},
            {1.19991298808, -1.02974425868},
            {1.19991298808, -1.1780972451},
            {1.19991298808, -1.2217304764},
            {1.72351176368, -1.2217304764},
            {1.72351176368, -1.11701072128},
            {1.57079632679, -1.11701072128},
            {1.57079632679, -1.06465084372},
            {1.4398966329, -1.06465084372},
            {1.4398966329, -1.0035643199},
            {1.308996939, -1.0035643199},
            {1.308996939, -0.942477796077},
            {1.1780972451, -0.942477796077},
            {1.1780972451, -0.855211333477},
            {1.11701159394, -0.855211333477},
            {1.06901329418, -0.855211333477},
            {1.06901329418, -0.890117918517},
            {1.00356344723, -0.890117918517},
        },
    },
    {
        "DRA",
        {4.36112834378, 1.27523562932},
        {3.92259949926, 0.892408469244},
        50,
        (const double[][2]) {
            {2.39982859416, 1.28281700022},
            {2.39982859416, 1.43116998664},
            {2.79252767586, 1.43116998664},
            {2.79252767586, 1.3962634016},
            {3.01069295969, 1.3962634016},
            {3.01069295969, 1.34390352404},
            {3.40339204139, 1.34390352404},
            {3.40339204139, 1.2217304764},
            {3.66519142919, 1.2217304764},
            {3.66519142919, 1.15191730632},
            {4.10152461485, 1.15191730632},
            {4.10152461485, 1.2217304764},
            {4.32841567228, 1.2217304764},
            {4.32841567228, 1.308996939},
            {4.58148928649, 1.308996939},
            {4.58148928649, 1.3962634016},
            {4.71238898038, 1.3962634016},
            {4.71238898038, 1.50098315672},
            {5.49778714378, 1.50098315672},
            {5.49778714378, 1.3962634016},
            {5.27962185995, 1.3962634016},
            {5.27962185995, 1.308996939},
            {5.41052155385, 1.308996939},
            {5.41052155385, 1.16937059884},
            {5.3450717069, 1.16937059884},
            {5.3450717069, 1.07337748998},
            {5.23598775598, 1.07337748998},
            {5.23598775598, 1.03847090494},
            {5.17490210483, 1.03847090494},
            {5.17490210483, 1.01229096616},
            {5.0832723191, 1.01229096616},
            {5.0832723191, 0.968657734857},
            {4.99600411117, 0.968657734857},
            {4.99600411117, 0.829031394697},
            {4.77347463154, 0.829031394697},
            {4.77347463154, 0.881391272257},
            {4.45058959259, 0.881391272257},
            {4.45058959259, 0.898844564777},
            {4.12334035784, 0.898844564777},
            {4.12334035784, 0.925024503557},
            {3.99244066394, 0.925024503557},
            {3.99244066394, 0.968657734857},
            {3.7742753801, 0.968657734857},
            {3.7742753801, 1.09955742876},
            {3.53429173529, 1.09955742876},
            {3.53429173529, 1.11701072128},
            {3.14159265359, 1.11701072128},
            {3.14159265359, 1.16064395258},
            {2.96705885573, 1.16064395258},
            {2.96705885573, 1.28281700022},
        },
    },
    {
        "EQU",
        {5.50829633216, 0.148567699208},
        {0.153512803123, 0.227322228336},
        9,
        (const double[][2]) {
            {5.45415303982, 0.0349065850399},
            {5.45415303982, 0.10471975512},
            {5.46506222031, 0.10471975512},
            {5.46506222031, 0.206530569975},
            {5.51087711317, 0.206530569975},
            {5.52833127836, 0.206530569975},
            {5.52833127836, 0.218166156499},
            {5.58505273372, 0.218166156499},
            {5.58505273372, 0.0349065850399},
        },
    },
    {
        "ERI",
        {0.933463028053, -0.600718952385},
        {1.16879610064, 1.20143790477},
        46,
        (const double[][2]) {
            {0.938113600282, 0.0},
            {1.20864137967, 0.0},
            {1.22173134906, 0.0},
            {1.22173134906, -0.0698131700798},
            {1.33081268198, -0.0698131700798},
            {1.33081268198, -0.191986217719},
            {1.28718119601, -0.191986217719},
            {1.28718119601, -0.253072741539},
            {1.26536283503, -0.253072741539},
            {1.26536283503, -0.475602221168},
            {1.23045712266, -0.475602221168},
            {1.23045712266, -0.523598775598},
            {1.19991298808, -0.523598775598},
            {1.19991298808, -0.645771823238},
            {1.11701159394, -0.645771823238},
            {1.11701159394, -0.698131700798},
            {1.01229183882, -0.698131700798},
            {1.01229183882, -0.767944870878},
            {0.894482114312, -0.767944870878},
            {0.894482114312, -0.802851455917},
            {0.785398163397, -0.802851455917},
            {0.785398163397, -0.855211333477},
            {0.698132573462, -0.855211333477},
            {0.698132573462, -0.890117918517},
            {0.632682726513, -0.890117918517},
            {0.632682726513, -0.942477796077},
            {0.567232879563, -0.942477796077},
            {0.567232879563, -1.02101761242},
            {0.349064977734, -1.02101761242},
            {0.349064977734, -0.933751149817},
            {0.414514824684, -0.933751149817},
            {0.414514824684, -0.898844564777},
            {0.479964671634, -0.898844564777},
            {0.479964671634, -0.840666981222},
            {0.610864365533, -0.840666981222},
            {0.610864365533, -0.698131700798},
            {0.785398163397, -0.698131700798},
            {0.785398163397, -0.690859437403},
            {0.916297857297, -0.690859437403},
            {0.916297857297, -0.628318530718},
            {0.981747704247, -0.628318530718},
            {0.981747704247, -0.4255693911},
            {0.693768377668, -0.4255693911},
            {0.693768377668, -0.0305432619099},
            {0.859573783943, -0.0305432619099},
            {0.938113600282, -0.0305432619099},
        },
    },
    {
        "FOR",
        {0.722734918111, -0.597215508495},
        {0.572803464896, 0.343292234789},
        11,
        (const double[][2]) {
            {0.436333185663, -0.4255693911},
            {0.693768377668, -0.4255693911},
            {0.981747704247, -0.4255693911},
            {0.981747704247, -0.628318530718},
            {0.916297857297, -0.628318530718},
            {0.916297857297, -0.690859437403},
            {0.785398163397, -0.690859437403},
            {0.785398163397, -0.698131700798},
            {0.610864365533, -0.698131700798},
            {0.436333185663, -0.698131700798},
            {0.436333185663, -0.445058959259},
        },
    },
    {
        "GEM",
        {1.83983961974, 0.38607232402},
        {0.599174855032, 0.467039120875},
        24,
        (const double[][2]) {
            {1.65151693204, 0.209439510239},
            {1.65151693204, 0.305432619099},
            {1.62752040015, 0.305432619099},
            {1.62752040015, 0.375245789179},
            {1.54025219222, 0.375245789179},
            {1.54025219222, 0.398516787694},
            {1.54025219222, 0.488692190558},
            {1.71042179429, 0.488692190558},
            {1.71042179429, 0.619591884458},
            {1.92858969612, 0.619591884458},
            {2.02894525544, 0.619591884458},
            {2.02894525544, 0.584685299418},
            {2.09439510239, 0.584685299418},
            {2.09439510239, 0.488692190558},
            {2.06385096782, 0.488692190558},
            {2.06385096782, 0.349065850399},
            {2.04421601373, 0.349065850399},
            {2.04421601373, 0.235619449019},
            {1.96349540849, 0.235619449019},
            {1.96349540849, 0.218166156499},
            {1.83259571459, 0.218166156499},
            {1.83259571459, 0.174532925199},
            {1.81514154941, 0.174532925199},
            {1.81514154941, 0.209439510239},
        },
    },
    {
        "GRU",
        {5.85123769869, -0.809066955272},
        {0.532369929954, 0.37154143673},
        9,
        (const double[][2]) {
            {5.58505273372, -0.645771823238},
            {5.58505273372, -0.794124809657},
            {5.58505273372, -0.872664625997},
            {5.75958653158, -0.872664625997},
            {5.75958653158, -0.994837673637},
            {6.10865150932, -0.994837673637},
            {6.10865150932, -0.698131700798},
            {6.10865150932, -0.645771823238},
            {6.02138591938, -0.645771823238},
        },
    },
    {
        "HER",
        {4.52174012185, 0.460967820962},
        {0.835085067908, 0.875753487629},
        33,
        (const double[][2]) {
            {4.25860424753, 0.0698131700798},
            {4.21060594777, 0.0698131700798},
            {4.21060594777, 0.279252680319},
            {4.1669744618, 0.279252680319},
            {4.1669744618, 0.383972435439},
            {4.19751597838, 0.383972435439},
            {4.19751597838, 0.453785605519},
            {4.23242430875, 0.453785605519},
            {4.23242430875, 0.471238898038},
            {4.27605579472, 0.471238898038},
            {4.27605579472, 0.698131700798},
            {4.12334035784, 0.698131700798},
            {4.12334035784, 0.898844564777},
            {4.45058959259, 0.898844564777},
            {4.45058959259, 0.881391272257},
            {4.77347463154, 0.881391272257},
            {4.77347463154, 0.829031394697},
            {4.75820387325, 0.829031394697},
            {4.75820387325, 0.523598775598},
            {4.80838296191, 0.523598775598},
            {4.80838296191, 0.453785605519},
            {4.93928265581, 0.453785605519},
            {4.93928265581, 0.445058959259},
            {4.93928265581, 0.367973525784},
            {4.93928265581, 0.322885911619},
            {4.93928265581, 0.209439510239},
            {4.88575777097, 0.209439510239},
            {4.77783882733, 0.209439510239},
            {4.77783882733, 0.250163801275},
            {4.51603943954, 0.250163801275},
            {4.51603943954, 0.223983862495},
            {4.38513974564, 0.223983862495},
            {4.38513974564, 0.0698131700798},
        },
    },
    {
        "HOR",
        {0.867748266698, -0.905047854337},
        {0.60103077427, 0.546098781518},
        23,
        (const double[][2]) {
            {1.11701159394, -0.698131700798},
            {1.11701159394, -0.855211333477},
            {1.06901329418, -0.855211333477},
            {1.06901329418, -0.890117918517},
            {1.00356344723, -0.890117918517},
            {1.00356344723, -0.927933443821},
            {0.916297857297, -0.927933443821},
            {0.916297857297, -1.0035643199},
            {0.837758040957, -1.0035643199},
            {0.837758040957, -1.1780972451},
            {0.567232879563, -1.1780972451},
            {0.567232879563, -1.02101761242},
            {0.567232879563, -0.942477796077},
            {0.632682726513, -0.942477796077},
            {0.632682726513, -0.890117918517},
            {0.698132573462, -0.890117918517},
            {0.698132573462, -0.855211333477},
            {0.785398163397, -0.855211333477},
            {0.785398163397, -0.802851455917},
            {0.894482114312, -0.802851455917},
            {0.894482114312, -0.767944870878},
            {1.01229183882, -0.767944870878},
            {1.01229183882, -0.698131700798},
        },
    },
    {
        "HYA",
        {2.78109178549, -0.401611146432},
        {2.24816657702, 1.04756838814},
        39,
        (const double[][2]) {
            {2.11621084538, 0.0},
            {2.11621084538, 0.12217304764},
            {2.42164433714, 0.12217304764},
            {2.50890992708, 0.12217304764},
            {2.50890992708, 0.0},
            {2.50890992708, -0.191986217719},
            {2.81434341884, -0.191986217719},
            {2.81434341884, -0.331612557879},
            {2.83615916183, -0.331612557879},
            {2.83615916183, -0.427605666739},
            {3.09795854963, -0.427605666739},
            {3.29430809047, -0.427605666739},
            {3.29430809047, -0.383972435439},
            {3.35975793742, -0.383972435439},
            {3.73064127614, -0.383972435439},
            {3.73064127614, -0.427605666739},
            {3.905175074, -0.427605666739},
            {3.905175074, -0.514872129338},
            {3.29430809047, -0.514872129338},
            {3.29430809047, -0.575958653158},
            {3.20704250054, -0.575958653158},
            {3.20704250054, -0.610865238198},
            {2.87979326579, -0.610865238198},
            {2.83615916183, -0.610865238198},
            {2.83615916183, -0.543961008383},
            {2.77070931488, -0.543961008383},
            {2.77070931488, -0.509054423343},
            {2.68344372494, -0.509054423343},
            {2.68344372494, -0.462512251778},
            {2.55254403104, -0.462512251778},
            {2.55254403104, -0.418879020479},
            {2.45218847172, -0.418879020479},
            {2.37801023318, -0.418879020479},
            {2.37801023318, -0.331612557879},
            {2.24711053928, -0.331612557879},
            {2.24711053928, -0.296705972839},
            {2.19038908392, -0.296705972839},
            {2.19038908392, -0.191986217719},
            {2.11621084538, -0.191986217719},
        },
    },
    {
        "HYI",
        {0.632775138172, -1.27782912334},
        {1.26555027634, 0.513623021856},
        14,
        (const double[][2]) {
            {1.19991298808, -1.1780972451},
            {1.19991298808, -1.2217304764},
            {1.19991298808, -1.308996939},
            {0.916297857297, -1.308996939},
            {0.916297857297, -1.4398966329},
            {0.0, -1.4398966329},
            {0.0, -1.308996939},
            {0.196349540849, -1.308996939},
            {0.196349540849, -1.32645023152},
            {0.349064977734, -1.32645023152},
            {0.349064977734, -1.02101761242},
            {0.567232879563, -1.02101761242},
            {0.567232879563, -1.1780972451},
            {0.837758040957, -1.1780972451},
        },
    },
    {
        "IND",
        {5.60909030732, -1.04473347538},
        {0.999122403989, 0.528526927233},
        12,
        (const double[][2]) {
            {5.58505273372, -1.308996939},
            {6.10865150932, -1.308996939},
            {6.10865150932, -1.1780972451},
            {5.75958653158, -1.1780972451},
            {5.75958653158, -0.994837673637},
            {5.75958653158, -0.872664625997},
            {5.58505273372, -0.872664625997},
            {5.58505273372, -0.794124809657},
            {5.32325334592, -0.794124809657},
            {5.32325334592, -0.994837673637},
            {5.32325334592, -1.0471975512},
            {5.58505273372, -1.0471975512},
        },
    },
    {
        "LAC",
        {5.83034860546, 0.790186911223},
        {0.312263203099, 0.383121586048},
        17,
        (const double[][2]) {
            {5.72686160811, 0.628318530718},
            {5.72686160811, 0.763581547748},
            {5.7355873817, 0.763581547748},
            {5.7355873817, 0.767944870878},
            {5.75086075799, 0.767944870878},
            {5.75086075799, 0.920661180427},
            {5.79449224396, 0.920661180427},
            {5.79449224396, 0.959931088597},
            {5.84249054372, 0.959931088597},
            {5.84249054372, 0.981747704247},
            {5.98648020701, 0.981747704247},
            {5.98648020701, 0.916297857297},
            {5.98648020701, 0.602138591938},
            {5.97339023762, 0.602138591938},
            {5.97339023762, 0.610865238198},
            {5.75958653158, 0.610865238198},
            {5.75958653158, 0.628318530718},
        },
    },
    {
        "LEO",
        {2.81565750641, 0.290304391821},
        {0.788026338534, 0.790048293882},
        20,
        (const double[][2]) {
            {2.81434341884, 0.0},
            {2.81434341884, 0.12217304764},
            {2.50890992708, 0.12217304764},
            {2.42164433714, 0.12217304764},
            {2.42164433714, 0.584685299418},
            {2.58744974342, 0.584685299418},
            {2.58744974342, 0.497418836818},
            {2.74889357189, 0.497418836818},
            {2.74889357189, 0.410152374219},
            {2.81434341884, 0.410152374219},
            {2.81434341884, 0.445058959259},
            {2.87979326579, 0.445058959259},
            {2.87979326579, 0.506145483078},
            {3.10668694121, 0.506145483078},
            {3.10668694121, 0.244346095279},
            {3.10668694121, 0.191986217719},
            {3.01505715548, 0.191986217719},
            {3.01505715548, 0.0},
            {3.01505715548, -0.10471975512},
            {2.81434341884, -0.10471975512},
        },
    },
    {
        "LEP",
        {1.38593277285, -0.302569099277},
        {0.430815377047, 0.346066243783},
        9,
        (const double[][2]) {
            {1.26536283503, -0.475602221168},
            {1.308996939, -0.475602221168},
            {1.60134046137, -0.475602221168},
            {1.60134046137, -0.191986217719},
            {1.52716222283, -0.191986217719},
            {1.33081268198, -0.191986217719},
            {1.28718119601, -0.191986217719},
            {1.28718119601, -0.253072741539},
            {1.26536283503, -0.253072741539},
        },
    },
    {
        "LIB",
        {3.94902567595, -0.253030311838},
        {0.436768799633, 0.523683635001},
        14,
        (const double[][2]) {
            {3.94880655997, 0.0},
            {3.83972522705, 0.0},
            {3.83972522705, -0.13962634016},
            {3.73064127614, -0.13962634016},
            {3.73064127614, -0.383972435439},
            {3.73064127614, -0.427605666739},
            {3.905175074, -0.427605666739},
            {3.905175074, -0.514872129338},
            {4.10152461485, -0.514872129338},
            {4.10152461485, -0.349065850399},
            {4.1669744618, -0.349065850399},
            {4.1669744618, -0.13962634016},
            {4.1669744618, -0.0567232006898},
            {3.94880655997, -0.0567232006898},
        },
    },
    {
        "LMI",
        {2.69852999373, 0.583026566171},
        {0.553771313186, 0.345748383904},
        17,
        (const double[][2]) {
            {2.42164433714, 0.584685299418},
            {2.42164433714, 0.693768377668},
            {2.50890992708, 0.693768377668},
            {2.50890992708, 0.733038285838},
            {2.66162798196, 0.733038285838},
            {2.66162798196, 0.698131700798},
            {2.82306919244, 0.698131700798},
            {2.82306919244, 0.593411945678},
            {2.87979326579, 0.593411945678},
            {2.87979326579, 0.506145483078},
            {2.87979326579, 0.445058959259},
            {2.81434341884, 0.445058959259},
            {2.81434341884, 0.410152374219},
            {2.74889357189, 0.410152374219},
            {2.74889357189, 0.497418836818},
            {2.58744974342, 0.497418836818},
            {2.58744974342, 0.584685299418},
        },
    },
    {
        "LUP",
        {3.98356257679, -0.786029139716},
        {0.549474087275, 0.542314020756},
        14,
        (const double[][2]) {
            {3.70882553315, -0.959931088597},
            {3.80481689668, -0.959931088597},
            {3.94008078638, -0.959931088597},
            {3.94008078638, -0.942477796077},
            {4.01425640692, -0.942477796077},
            {4.01425640692, -0.837758040957},
            {4.10152461485, -0.837758040957},
            {4.10152461485, -0.733038285838},
            {4.18879020479, -0.733038285838},
            {4.18879020479, -0.514872129338},
            {4.10152461485, -0.514872129338},
            {3.905175074, -0.514872129338},
            {3.905175074, -0.733038285838},
            {3.70882553315, -0.733038285838},
        },
    },
    {
        "LYN",
        {2.05394846831, 0.846736806045},
        {0.913944405461, 0.524103013253},
        23,
        (const double[][2]) {
            {1.92858969612, 0.619591884458},
            {1.92858969612, 0.776671517137},
            {1.78023583703, 0.776671517137},
            {1.78023583703, 0.872664625997},
            {1.70169602069, 0.872664625997},
            {1.70169602069, 0.942477796077},
            {1.59697626557, 0.942477796077},
            {1.59697626557, 0.977384381117},
            {1.59697626557, 1.08210413624},
            {1.83259571459, 1.08210413624},
            {1.83259571459, 1.0471975512},
            {2.0856693288, 1.0471975512},
            {2.20347905331, 1.0471975512},
            {2.20347905331, 0.820304748437},
            {2.39982859416, 0.820304748437},
            {2.39982859416, 0.733038285838},
            {2.50890992708, 0.733038285838},
            {2.50890992708, 0.693768377668},
            {2.42164433714, 0.693768377668},
            {2.42164433714, 0.584685299418},
            {2.09439510239, 0.584685299418},
            {2.02894525544, 0.584685299418},
            {2.02894525544, 0.619591884458},
        },
    },
    {
        "LYR",
        {4.95600436626, 0.619623680956},
        {0.395600986018, 0.418815427483},
        17,
        (const double[][2]) {
            {4.93928265581, 0.445058959259},
            {4.93928265581, 0.453785605519},
            {4.80838296191, 0.453785605519},
            {4.80838296191, 0.523598775598},
            {4.75820387325, 0.523598775598},
            {4.75820387325, 0.829031394697},
            {4.77347463154, 0.829031394697},
            {4.99600411117, 0.829031394697},
            {5.01782247215, 0.829031394697},
            {5.01782247215, 0.759218224618},
            {5.0789081233, 0.759218224618},
            {5.0789081233, 0.637045176978},
            {5.06799894281, 0.637045176978},
            {5.06799894281, 0.523598775598},
            {5.04181900403, 0.523598775598},
            {5.04181900403, 0.479965544298},
            {5.04181900403, 0.445058959259},
        },
    },
    {
        "MEN",
        {1.46171291574, -1.37025733115},
        {1.09083319343, 0.297053709511},
        10,
        (const double[][2]) {
            {2.00712951246, -1.4835298642},
            {0.916297857297, -1.4835298642},
            {0.916297857297, -1.4398966329},
            {0.916297857297, -1.308996939},
            {1.19991298808, -1.308996939},
            {1.19991298808, -1.2217304764},
            {1.72351176368, -1.2217304764},
            {1.72351176368, -1.308996939},
            {2.00712951246, -1.308996939},
            {2.00712951246, -1.4398966329},
        },
    },
    {
        "MIC",
        {5.4806554318, -0.646246660703},
        {0.314804171767, 0.31510894029},
        5,
        (const double[][2]) {
            {5.32325334592, -0.488692190558},
            {5.58505273372, -0.488692190558},
            {5.58505273372, -0.645771823238},
            {5.58505273372, -0.794124809657},
            {5.32325334592, -0.794124809657},
        },
    },
    {
        "MON",
        {1.77678962499, 0.0243581100583},
        {0.678842440784, 0.432688655555},
        19,
        (const double[][2]) {
            {1.63406538484, 0.0},
            {1.63406538484, 0.174532925199},
            {1.65151693204, 0.174532925199},
            {1.65151693204, 0.209439510239},
            {1.81514154941, 0.209439510239},
            {1.81514154941, 0.174532925199},
            {1.83259571459, 0.174532925199},
            {1.83259571459, 0.0959931088597},
            {1.83695991039, 0.0959931088597},
            {1.83695991039, 0.0261799387799},
            {1.88495559215, 0.0261799387799},
            {1.88495559215, 0.0},
            {2.11621084538, 0.0},
            {2.11621084538, -0.191986217719},
            {1.92858969612, -0.191986217719},
            {1.60134046137, -0.191986217719},
            {1.52716222283, -0.191986217719},
            {1.52716222283, -0.0698131700798},
            {1.63406538484, -0.0698131700798},
        },
    },
    {
        "MUS",
        {3.35282036529, -1.18660905855},
        {0.815154505096, 0.244775760897},
        9,
        (const double[][2]) {
            {2.94524311274, -1.11701072128},
            {2.94524311274, -1.308996939},
            {3.57792583925, -1.308996939},
            {3.57792583925, -1.2217304764},
            {3.57792583925, -1.1344640138},
            {3.53429173529, -1.1344640138},
            {3.53429173529, -1.11701072128},
            {3.35975793742, -1.11701072128},
            {3.09795854963, -1.11701072128},
        },
    },
    {
        "NOR",
        {4.10900578988, -0.884837065392},
        {0.379914902546, 0.32472097161},
        12,
        (const double[][2]) {
            {4.01425640692, -1.0471975512},
            {4.29896324115, -1.0471975512},
            {4.29896324115, -0.794124809657},
            {4.29896324115, -0.733038285838},
            {4.18879020479, -0.733038285838},
            {4.10152461485, -0.733038285838},
            {4.10152461485, -0.837758040957},
            {4.01425640692, -0.837758040957},
            {4.01425640692, -0.942477796077},
            {3.94008078638, -0.942477796077},
            {3.94008078638, -0.959931088597},
            {4.01425640692, -0.959931088597},
        },
    },
    {
        "OCT",
        {5.92549106125, -1.5117630244},
        {5.56779681531, 0.405532170811},
        14,
        (const double[][2]) {
            {0.0, -1.57079632679},
            {0.0, -1.4398966329},
            {0.916297857297, -1.4398966329},
            {0.916297857297, -1.4835298642},
            {2.00712951246, -1.4835298642},
            {2.00712951246, -1.4398966329},
            {3.57792583925, -1.4398966329},
            {4.71238898038, -1.4398966329},
            {4.71238898038, -1.308996939},
            {5.58505273372, -1.308996939},
            {6.10865150932, -1.308996939},
            {6.28318530718, -1.308996939},
            {6.28318530718, -1.57079632679},
            {3.14159265359, -1.57079632679},
        },
    },
    {
        "OPH",
        {4.53518911899, -0.0895912247325},
        {0.736429314384, 0.868015101732},
        39,
        (const double[][2]) {
            {4.25860424753, 0.0},
            {4.25860424753, 0.0698131700798},
            {4.38513974564, 0.0698131700798},
            {4.38513974564, 0.223983862495},
            {4.51603943954, 0.223983862495},
            {4.51603943954, 0.250163801275},
            {4.77783882733, 0.250163801275},
            {4.77783882733, 0.209439510239},
            {4.88575777097, 0.209439510239},
            {4.88575777097, 0.10908307825},
            {4.77783882733, 0.10908307825},
            {4.77783882733, 0.0785398163397},
            {4.8236537202, 0.0785398163397},
            {4.8236537202, 0.0523598775598},
            {4.77783882733, 0.0523598775598},
            {4.77783882733, 0.0},
            {4.66875487642, 0.0},
            {4.66875487642, -0.0698131700798},
            {4.70366320679, -0.0698131700798},
            {4.70366320679, -0.174532925199},
            {4.62512339045, -0.174532925199},
            {4.62512339045, -0.203621804244},
            {4.60330502947, -0.203621804244},
            {4.60330502947, -0.174532925199},
            {4.49422369655, -0.174532925199},
            {4.49422369655, -0.279252680319},
            {4.60766922527, -0.279252680319},
            {4.60766922527, -0.523598775598},
            {4.38513974564, -0.523598775598},
            {4.38513974564, -0.429060049604},
            {4.25860424753, -0.429060049604},
            {4.25860424753, -0.335975881009},
            {4.28696497521, -0.335975881009},
            {4.28696497521, -0.318522588489},
            {4.25860424753, -0.318522588489},
            {4.25860424753, -0.13962634016},
            {4.1669744618, -0.13962634016},
            {4.1669744618, -0.0567232006898},
            {4.25860424753, -0.0567232006898},
        },
    },
    {
        "ORI",
        {1.467134274, 0.172471654108},
        {0.516985788656, 0.728915743654},
        28,
        (const double[][2]) {
            {1.20864137967, 0.0},
            {1.20864137967, 0.270526034059},
            {1.3002711654, 0.270526034059},
            {1.3002711654, 0.279252680319},
            {1.39626252893, 0.279252680319},
            {1.39626252893, 0.270526034059},
            {1.46607657168, 0.270526034059},
            {1.46607657168, 0.218166156499},
            {1.50971067564, 0.218166156499},
            {1.50971067564, 0.314159265359},
            {1.49225651046, 0.314159265359},
            {1.49225651046, 0.398516787694},
            {1.54025219222, 0.398516787694},
            {1.54025219222, 0.375245789179},
            {1.62752040015, 0.375245789179},
            {1.62752040015, 0.305432619099},
            {1.65151693204, 0.305432619099},
            {1.65151693204, 0.209439510239},
            {1.65151693204, 0.174532925199},
            {1.63406538484, 0.174532925199},
            {1.63406538484, 0.0},
            {1.63406538484, -0.0698131700798},
            {1.52716222283, -0.0698131700798},
            {1.52716222283, -0.191986217719},
            {1.33081268198, -0.191986217719},
            {1.33081268198, -0.0698131700798},
            {1.22173134906, -0.0698131700798},
            {1.22173134906, 0.0},
        },
    },
    {
        "PAV",
        {5.01040970329, -1.1483981871},
        {1.14928606086, 0.321197503799},
        9,
        (const double[][2]) {
            {4.71238898038, -1.308996939},
            {5.58505273372, -1.308996939},
            {5.58505273372, -1.0471975512},
            {5.32325334592, -1.0471975512},
            {5.32325334592, -0.994837673637},
            {4.71238898038, -0.994837673637},
            {4.58148928649, -0.994837673637},
            {4.58148928649, -1.1780972451},
            {4.71238898038, -1.1780972451},
        },
    },
    {
        "PEG",
        {5.89908972391, 0.354057465311},
        {0.84236940507, 0.647028406802},
        41,
        (const double[][2]) {
            {5.58505273372, 0.0349065850399},
            {5.58505273372, 0.218166156499},
            {5.52833127836, 0.218166156499},
            {5.52833127836, 0.206530569975},
            {5.51087711317, 0.206530569975},
            {5.51087711317, 0.340339204139},
            {5.56323699073, 0.340339204139},
            {5.56323699073, 0.410152374219},
            {5.6068710947, 0.410152374219},
            {5.6068710947, 0.488692190558},
            {5.68977248884, 0.488692190558},
            {5.68977248884, 0.628318530718},
            {5.72686160811, 0.628318530718},
            {5.75958653158, 0.628318530718},
            {5.75958653158, 0.610865238198},
            {5.97339023762, 0.610865238198},
            {5.97339023762, 0.602138591938},
            {5.98648020701, 0.602138591938},
            {6.15228561328, 0.602138591938},
            {6.15228561328, 0.559959743504},
            {6.21773546023, 0.559959743504},
            {6.21773546023, 0.546869774114},
            {0.0, 0.546869774114},
            {0.0, 0.488692190558},
            {0.0174541651846, 0.488692190558},
            {0.0174541651846, 0.383972435439},
            {0.0370891192695, 0.383972435439},
            {0.0370891192695, 0.366519142919},
            {0.0370891192695, 0.218166156499},
            {0.0, 0.218166156499},
            {0.0, 0.174532925199},
            {6.23955120322, 0.174532925199},
            {6.23955120322, 0.1308996939},
            {5.95593607243, 0.1308996939},
            {5.95593607243, 0.0349065850399},
            {5.75958653158, 0.0349065850399},
            {5.75958653158, 0.0305432619099},
            {5.67232094165, 0.0305432619099},
            {5.67232094165, 0.0479965544298},
            {5.61996106409, 0.0479965544298},
            {5.61996106409, 0.0349065850399},
        },
    },
    {
        "PER",
        {0.723391943467, 0.844026349295},
        {1.00976878058, 0.617583974345},
        28,
        (const double[][2]) {
            {0.711222542852, 0.535234362123},
            {0.711222542852, 0.593411945678},
            {0.671952634682, 0.593411945678},
            {0.671952634682, 0.641408500108},
            {0.658862665292, 0.641408500108},
            {0.658862665292, 0.881391272257},
            {0.534507956088, 0.881391272257},
            {0.534507956088, 0.820304748437},
            {0.436333185663, 0.820304748437},
            {0.436333185663, 0.872664625997},
            {0.357793369323, 0.872664625997},
            {0.357793369323, 0.942477796077},
            {0.445058959259, 0.942477796077},
            {0.445058959259, 1.0035643199},
            {0.499599625719, 1.0035643199},
            {0.499599625719, 1.02101761242},
            {0.637044304313, 1.02101761242},
            {0.637044304313, 0.994837673637},
            {0.811578102177, 0.994837673637},
            {0.829032267362, 0.994837673637},
            {0.829032267362, 0.959931088597},
            {0.872663753333, 0.959931088597},
            {0.872663753333, 0.916297857297},
            {1.22827633376, 0.916297857297},
            {1.22827633376, 0.628318530718},
            {1.1780972451, 0.628318530718},
            {1.1780972451, 0.535234362123},
            {0.881392144922, 0.535234362123},
        },
    },
    {
        "PHE",
        {0.317626322514, -0.893345358353},
        {0.984320240757, 0.390427315112},
        12,
        (const double[][2]) {
            {6.10865150932, -0.698131700798},
            {6.10865150932, -0.994837673637},
            {6.10865150932, -1.02101761242},
            {0.349064977734, -1.02101761242},
            {0.349064977734, -0.933751149817},
            {0.414514824684, -0.933751149817},
            {0.414514824684, -0.898844564777},
            {0.479964671634, -0.898844564777},
            {0.479964671634, -0.840666981222},
            {0.610864365533, -0.840666981222},
            {0.610864365533, -0.698131700798},
            {0.436333185663, -0.698131700798},
        },
    },
    {
        "PIC",
        {1.46647039289, -0.953439138454},
        {0.644982435481, 0.405895120192},
        22,
        (const double[][2]) {
            {1.57079632679, -0.750491578358},
            {1.308996939, -0.750491578358},
            {1.26536283503, -0.750491578358},
            {1.26536283503, -0.811578102177},
            {1.1780972451, -0.811578102177},
            {1.1780972451, -0.855211333477},
            {1.1780972451, -0.942477796077},
            {1.308996939, -0.942477796077},
            {1.308996939, -1.0035643199},
            {1.4398966329, -1.0035643199},
            {1.4398966329, -1.06465084372},
            {1.57079632679, -1.06465084372},
            {1.57079632679, -1.11701072128},
            {1.72351176368, -1.11701072128},
            {1.78896161063, -1.11701072128},
            {1.78896161063, -1.01229096616},
            {1.70169602069, -1.01229096616},
            {1.70169602069, -0.959931088597},
            {1.61443043076, -0.959931088597},
            {1.61443043076, -0.916297857297},
            {1.57079632679, -0.916297857297},
            {1.57079632679, -0.885754595387},
        },
    },
    {
        "PSA",
        {5.75174240009, -0.527379671923},
        {0.539287038589, 0.23678430263},
        6,
        (const double[][2]) {
            {6.02138591938, -0.445058959259},
            {5.72468081921, -0.445058959259},
            {5.58505273372, -0.445058959259},
            {5.58505273372, -0.488692190558},
            {5.58505273372, -0.645771823238},
            {6.02138591938, -0.645771823238},
        },
    },
    {
        "PSC",
        {0.0997278421721, 0.207967458649},
        {0.853954153842, 0.735982389018},
        26,
        (const double[][2]) {
            {5.95593607243, 0.0},
            {5.95593607243, 0.0349065850399},
            {5.95593607243, 0.1308996939},
            {6.23955120322, 0.1308996939},
            {6.23955120322, 0.174532925199},
            {0.0, 0.174532925199},
            {0.0, 0.218166156499},
            {0.0370891192695, 0.218166156499},
            {0.0370891192695, 0.366519142919},
            {0.222529479629, 0.366519142919},
            {0.222529479629, 0.414515697349},
            {0.187623767254, 0.414515697349},
            {0.187623767254, 0.575958653158},
            {0.368699931819, 0.575958653158},
            {0.368699931819, 0.488692190558},
            {0.436333185663, 0.488692190558},
            {0.436333185663, 0.436332312999},
            {0.436333185663, 0.173078542334},
            {0.523598775598, 0.173078542334},
            {0.523598775598, 0.0349065850399},
            {0.0872655899351, 0.0349065850399},
            {0.0872655899351, 0.0},
            {0.0872655899351, -0.12217304764},
            {6.23955120322, -0.12217304764},
            {6.23955120322, -0.0698131700798},
            {5.95593607243, -0.0698131700798},
        },
    },
    {
        "PUP",
        {1.97798467269, -0.585044897053},
        {0.814376691798, 0.786117358667},
        13,
        (const double[][2]) {
            {1.92858969612, -0.191986217719},
            {1.92858969612, -0.575958653158},
            {1.72351176368, -0.575958653158},
            {1.72351176368, -0.750491578358},
            {1.57079632679, -0.750491578358},
            {1.57079632679, -0.885754595387},
            {2.09439510239, -0.885754595387},
            {2.09439510239, -0.750491578358},
            {2.19038908392, -0.750491578358},
            {2.19038908392, -0.641408500108},
            {2.19038908392, -0.296705972839},
            {2.19038908392, -0.191986217719},
            {2.11621084538, -0.191986217719},
        },
    },
    {
        "PYX",
        {2.31557213851, -0.423784566404},
        {0.273232666415, 0.435247867408},
        8,
        (const double[][2]) {
            {2.19038908392, -0.296705972839},
            {2.24711053928, -0.296705972839},
            {2.24711053928, -0.331612557879},
            {2.37801023318, -0.331612557879},
            {2.37801023318, -0.418879020479},
            {2.45218847172, -0.418879020479},
            {2.45218847172, -0.641408500108},
            {2.19038908392, -0.641408500108},
        },
    },
    {
        "RET",
        {1.02341318259, -1.01952535939},
        {0.371310283274, 0.317143771408},
        11,
        (const double[][2]) {
            {0.837758040957, -1.1780972451},
            {1.19991298808, -1.1780972451},
            {1.19991298808, -1.02974425868},
            {1.13446314113, -1.02974425868},
            {1.13446314113, -0.986111027377},
            {1.0471975512, -0.986111027377},
            {1.0471975512, -0.927933443821},
            {1.00356344723, -0.927933443821},
            {0.916297857297, -0.927933443821},
            {0.916297857297, -1.0035643199},
            {0.837758040957, -1.0035643199},
        },
    },
    {
        "SCL",
        {6.2749346339, -0.593975272585},
        {0.889167717881, 0.297832626653},
        7,
        (const double[][2]) {
            {6.02138591938, -0.445058959259},
            {6.23955120322, -0.445058959259},
            {0.436333185663, -0.445058959259},
            {0.436333185663, -0.698131700798},
            {6.10865150932, -0.698131700798},
            {6.10865150932, -0.645771823238},
            {6.02138591938, -0.645771823238},
        },
    },
    {
        "SCO",
        {4.31688659718, -0.478424086832},
        {0.703736558485, 0.677595493346},
        20,
        (const double[][2]) {
            {4.1669744618, -0.13962634016},
            {4.25860424753, -0.13962634016},
            {4.25860424753, -0.318522588489},
            {4.28696497521, -0.318522588489},
            {4.28696497521, -0.335975881009},
            {4.25860424753, -0.335975881009},
            {4.25860424753, -0.429060049604},
            {4.38513974564, -0.429060049604},
            {4.38513974564, -0.523598775598},
            {4.60766922527, -0.523598775598},
            {4.66875487642, -0.523598775598},
            {4.66875487642, -0.645771823238},
            {4.66875487642, -0.794124809657},
            {4.29896324115, -0.794124809657},
            {4.29896324115, -0.733038285838},
            {4.18879020479, -0.733038285838},
            {4.18879020479, -0.514872129338},
            {4.10152461485, -0.514872129338},
            {4.10152461485, -0.349065850399},
            {4.1669744618, -0.349065850399},
        },
    },
    {
        "SCT",
        {4.87308857658, -0.163389381423},
        {0.1904994985, 0.231726597792},
        6,
        (const double[][2]) {
            {4.77783882733, -0.279252680319},
            {4.93928265581, -0.279252680319},
            {4.93928265581, -0.210021228479},
            {4.93928265581, -0.0698131700798},
            {4.86510441727, -0.0698131700798},
            {4.77783882733, -0.0698131700798},
        },
    },
    {
        "SER1",
        {4.1252975751, 0.187705571554},
        {0.35298203025, 0.532160067929},
        15,
        (const double[][2]) {
            {3.94880655997, 0.0},
            {3.94880655997, 0.13962634016},
            {3.94880655997, 0.453785605519},
            {3.97498649875, 0.453785605519},
            {4.19751597838, 0.453785605519},
            {4.19751597838, 0.383972435439},
            {4.1669744618, 0.383972435439},
            {4.1669744618, 0.279252680319},
            {4.21060594777, 0.279252680319},
            {4.21060594777, 0.0698131700798},
            {4.25860424753, 0.0698131700798},
            {4.25860424753, 0.0},
            {4.25860424753, -0.0567232006898},
            {4.1669744618, -0.0567232006898},
            {3.94880655997, -0.0567232006898},
        },
    },
    {
        "SER2",
        {4.73989414435, -0.0629177737188},
        {0.491340895593, 0.432669813201},
        25,
        (const double[][2]) {
            {4.77783882733, 0.0},
            {4.77783882733, 0.0523598775598},
            {4.8236537202, 0.0523598775598},
            {4.8236537202, 0.0785398163397},
            {4.77783882733, 0.0785398163397},
            {4.77783882733, 0.10908307825},
            {4.88575777097, 0.10908307825},
            {4.93928265581, 0.10908307825},
            {4.93928265581, 0.0349065850399},
            {4.86510441727, 0.0349065850399},
            {4.86510441727, 0.0},
            {4.86510441727, -0.0698131700798},
            {4.77783882733, -0.0698131700798},
            {4.77783882733, -0.279252680319},
            {4.60766922527, -0.279252680319},
            {4.49422369655, -0.279252680319},
            {4.49422369655, -0.174532925199},
            {4.60330502947, -0.174532925199},
            {4.60330502947, -0.203621804244},
            {4.62512339045, -0.203621804244},
            {4.62512339045, -0.174532925199},
            {4.70366320679, -0.174532925199},
            {4.70366320679, -0.0698131700798},
            {4.66875487642, -0.0698131700798},
            {4.66875487642, 0.0},
        },
    },
    {
        "SEX",
        {2.68367047345, -0.0353025272784},
        {0.349521092742, 0.314951149836},
        7,
        (const double[][2]) {
            {2.50890992708, 0.0},
            {2.50890992708, 0.12217304764},
            {2.81434341884, 0.12217304764},
            {2.81434341884, 0.0},
            {2.81434341884, -0.10471975512},
            {2.81434341884, -0.191986217719},
            {2.50890992708, -0.191986217719},
        },
    },
    {
        "SGE",
        {5.13264128162, 0.327075457055},
        {0.386717251624, 0.104372199731},
        14,
        (const double[][2]) {
            {4.93928265581, 0.322885911619},
            {4.93928265581, 0.367973525784},
            {5.03963821513, 0.367973525784},
            {5.03963821513, 0.334521498143},
            {5.19235365202, 0.334521498143},
            {5.19235365202, 0.370882466049},
            {5.30143760293, 0.370882466049},
            {5.30143760293, 0.357792496659},
            {5.30143760293, 0.274889357189},
            {5.27307687525, 0.274889357189},
            {5.19235365202, 0.274889357189},
            {5.19235365202, 0.282161620583},
            {4.97418836818, 0.282161620583},
            {4.97418836818, 0.322885911619},
        },
    },
    {
        "SGR",
        {4.94482666296, -0.487533986017},
        {0.756853365923, 0.61318164728},
        13,
        (const double[][2]) {
            {4.93928265581, -0.210021228479},
            {4.93928265581, -0.279252680319},
            {4.77783882733, -0.279252680319},
            {4.60766922527, -0.279252680319},
            {4.60766922527, -0.523598775598},
            {4.66875487642, -0.523598775598},
            {4.66875487642, -0.645771823238},
            {5.01782247215, -0.645771823238},
            {5.01782247215, -0.794124809657},
            {5.32325334592, -0.794124809657},
            {5.32325334592, -0.488692190558},
            {5.23598775598, -0.488692190558},
            {5.23598775598, -0.210021228479},
        },
    },
    {
        "TAU",
        {1.23087359903, 0.301295472177},
        {0.742599630184, 0.663677468175},
        27,
        (const double[][2]) {
            {0.859573783943, -0.0305432619099},
            {0.859573783943, 0.0},
            {0.859573783943, 0.173078542334},
            {0.859573783943, 0.331612557879},
            {0.881392144922, 0.331612557879},
            {0.881392144922, 0.535234362123},
            {1.1780972451, 0.535234362123},
            {1.1780972451, 0.523598775598},
            {1.24354709205, 0.523598775598},
            {1.24354709205, 0.497418836818},
            {1.54025219222, 0.497418836818},
            {1.54025219222, 0.488692190558},
            {1.54025219222, 0.398516787694},
            {1.49225651046, 0.398516787694},
            {1.49225651046, 0.314159265359},
            {1.50971067564, 0.314159265359},
            {1.50971067564, 0.218166156499},
            {1.46607657168, 0.218166156499},
            {1.46607657168, 0.270526034059},
            {1.39626252893, 0.270526034059},
            {1.39626252893, 0.279252680319},
            {1.3002711654, 0.279252680319},
            {1.3002711654, 0.270526034059},
            {1.20864137967, 0.270526034059},
            {1.20864137967, 0.0},
            {0.938113600282, 0.0},
            {0.938113600282, -0.0305432619099},
        },
    },
    {
        "TEL",
        {5.01782146136, -0.892386244449},
        {0.610864961942, 0.204902858376},
        5,
        (const double[][2]) {
            {5.32325334592, -0.994837673637},
            {5.32325334592, -0.794124809657},
            {5.01782247215, -0.794124809657},
            {4.71238898038, -0.794124809657},
            {4.71238898038, -0.994837673637},
        },
    },
    {
        "TRA",
        {4.1814223791, -1.1324927789},
        {0.639762818124, 0.178475394986},
        18,
        (const double[][2]) {
            {3.86154097004, -1.2217304764},
            {3.86154097004, -1.1780972451},
            {3.905175074, -1.1780972451},
            {3.905175074, -1.10973845788},
            {3.97062492095, -1.10973845788},
            {3.97062492095, -1.06465084372},
            {4.01425640692, -1.06465084372},
            {4.01425640692, -1.0471975512},
            {4.29896324115, -1.0471975512},
            {4.29896324115, -1.06465084372},
            {4.34150564167, -1.06465084372},
            {4.34150564167, -1.10973845788},
            {4.38513974564, -1.10973845788},
            {4.38513974564, -1.1344640138},
            {4.40695548862, -1.1344640138},
            {4.40695548862, -1.1780972451},
            {4.45058959259, -1.1780972451},
            {4.45058959259, -1.2217304764},
        },
    },
    {
        "TRI",
        {0.543387269196, 0.55208470038},
        {0.349374674753, 0.231504774762},
        16,
        (const double[][2]) {
            {0.436333185663, 0.436332312999},
            {0.436333185663, 0.488692190558},
            {0.368699931819, 0.488692190558},
            {0.368699931819, 0.575958653158},
            {0.368699931819, 0.610865238198},
            {0.523598775598, 0.610865238198},
            {0.523598775598, 0.641408500108},
            {0.658862665292, 0.641408500108},
            {0.671952634682, 0.641408500108},
            {0.671952634682, 0.593411945678},
            {0.711222542852, 0.593411945678},
            {0.711222542852, 0.535234362123},
            {0.632682726513, 0.535234362123},
            {0.632682726513, 0.475602221168},
            {0.501783032613, 0.475602221168},
            {0.501783032613, 0.436332312999},
        },
    },
    {
        "TUC",
        {6.18205799317, -1.19485049956},
        {0.900384583484, 0.400025651851},
        11,
        (const double[][2]) {
            {6.10865150932, -1.308996939},
            {0.0, -1.308996939},
            {0.196349540849, -1.308996939},
            {0.196349540849, -1.32645023152},
            {0.349064977734, -1.32645023152},
            {0.349064977734, -1.02101761242},
            {6.10865150932, -1.02101761242},
            {6.10865150932, -0.994837673637},
            {5.75958653158, -0.994837673637},
            {5.75958653158, -1.1780972451},
            {6.10865150932, -1.1780972451},
        },
    },
    {
        "UMA",
        {2.97468260221, 0.937589158961},
        {1.77802654682, 0.862887351764},
        32,
        (const double[][2]) {
            {2.50890992708, 0.733038285838},
            {2.39982859416, 0.733038285838},
            {2.39982859416, 0.820304748437},
            {2.20347905331, 0.820304748437},
            {2.20347905331, 1.0471975512},
            {2.0856693288, 1.0471975512},
            {2.0856693288, 1.28281700022},
            {2.39982859416, 1.28281700022},
            {2.96705885573, 1.28281700022},
            {2.96705885573, 1.16064395258},
            {3.14159265359, 1.16064395258},
            {3.14159265359, 1.11701072128},
            {3.53429173529, 1.11701072128},
            {3.53429173529, 1.09955742876},
            {3.7742753801, 1.09955742876},
            {3.7742753801, 0.968657734857},
            {3.67391720278, 0.968657734857},
            {3.67391720278, 0.846484687217},
            {3.53429173529, 0.846484687217},
            {3.53429173529, 0.925024503557},
            {3.16340839658, 0.925024503557},
            {3.16340839658, 0.785398163397},
            {3.14159265359, 0.785398163397},
            {3.14159265359, 0.593411945678},
            {3.14159265359, 0.506145483078},
            {3.10668694121, 0.506145483078},
            {2.87979326579, 0.506145483078},
            {2.87979326579, 0.593411945678},
            {2.82306919244, 0.593411945678},
            {2.82306919244, 0.698131700798},
            {2.66162798196, 0.698131700798},
            {2.66162798196, 0.733038285838},
        },
    },
    {
        "UMI",
        {4.0056925357, 1.40591207191},
        {4.03138676737, 0.50798953119},
        22,
        (const double[][2]) {
            {3.40339204139, 1.34390352404},
            {3.40339204139, 1.2217304764},
            {3.66519142919, 1.2217304764},
            {3.66519142919, 1.15191730632},
            {4.10152461485, 1.15191730632},
            {4.10152461485, 1.2217304764},
            {4.32841567228, 1.2217304764},
            {4.32841567228, 1.308996939},
            {4.58148928649, 1.308996939},
            {4.58148928649, 1.3962634016},
            {4.71238898038, 1.3962634016},
            {4.71238898038, 1.50098315672},
            {5.49778714378, 1.50098315672},
            {5.49778714378, 1.50389192245},
            {6.02138591938, 1.50389192245},
            {6.02138591938, 1.53588974176},
            {2.09439510239, 1.53588974176},
            {2.09439510239, 1.50970980298},
            {3.79609112309, 1.50970980298},
            {3.79609112309, 1.3962634016},
            {3.55610747827, 1.3962634016},
            {3.55610747827, 1.34390352404},
        },
    },
    {
        "VEL",
        {2.32508582958, -0.849166234708},
        {1.10941487242, 0.4155154692},
        14,
        (const double[][2]) {
            {2.87979326579, -0.986111027377},
            {2.87979326579, -0.693768377668},
            {2.45218847172, -0.693768377668},
            {2.45218847172, -0.641408500108},
            {2.19038908392, -0.641408500108},
            {2.19038908392, -0.750491578358},
            {2.09439510239, -0.750491578358},
            {2.09439510239, -0.885754595387},
            {2.13802920636, -0.885754595387},
            {2.13802920636, -0.925024503557},
            {2.2122048269, -0.925024503557},
            {2.2122048269, -0.951204442337},
            {2.31256038623, -0.951204442337},
            {2.31256038623, -0.986111027377},
        },
    },
    {
        "VIR",
        {3.41961878967, 0.00245381362698},
        {1.0583755406, 0.772852498131},
        19,
        (const double[][2]) {
            {3.01505715548, 0.0},
            {3.01505715548, 0.191986217719},
            {3.10668694121, 0.191986217719},
            {3.10668694121, 0.244346095279},
            {3.35975793742, 0.244346095279},
            {3.35975793742, 0.261799387799},
            {3.53429173529, 0.261799387799},
            {3.53429173529, 0.13962634016},
            {3.94880655997, 0.13962634016},
            {3.94880655997, 0.0},
            {3.83972522705, 0.0},
            {3.83972522705, -0.13962634016},
            {3.73064127614, -0.13962634016},
            {3.73064127614, -0.383972435439},
            {3.35975793742, -0.383972435439},
            {3.35975793742, -0.191986217719},
            {3.09795854963, -0.191986217719},
            {3.09795854963, -0.10471975512},
            {3.01505715548, -0.10471975512},
        },
    },
    {
        "VOL",
        {1.94665886886, -1.22664719812},
        {0.836522789849, 0.219272953687},
        7,
        (const double[][2]) {
            {1.72351176368, -1.11701072128},
            {1.72351176368, -1.2217304764},
            {1.72351176368, -1.308996939},
            {2.00712951246, -1.308996939},
            {2.36492026379, -1.308996939},
            {2.36492026379, -1.11701072128},
            {1.78896161063, -1.11701072128},
        },
    },
    {
        "VUL",
        {5.28074168344, 0.415893716721},
        {0.682918055254, 0.180503532715},
        21,
        (const double[][2]) {
            {4.93928265581, 0.367973525784},
            {4.93928265581, 0.445058959259},
            {5.04181900403, 0.445058959259},
            {5.04181900403, 0.479965544298},
            {5.14872216605, 0.479965544298},
            {5.14872216605, 0.506145483078},
            {5.4759714008, 0.506145483078},
            {5.4759714008, 0.488692190558},
            {5.6068710947, 0.488692190558},
            {5.6068710947, 0.410152374219},
            {5.56323699073, 0.410152374219},
            {5.56323699073, 0.340339204139},
            {5.51087711317, 0.340339204139},
            {5.38434161507, 0.340339204139},
            {5.38434161507, 0.357792496659},
            {5.30143760293, 0.357792496659},
            {5.30143760293, 0.370882466049},
            {5.19235365202, 0.370882466049},
            {5.19235365202, 0.334521498143},
            {5.03963821513, 0.334521498143},
            {5.03963821513, 0.367973525784},
        },
    },
    {
        "",
    }
};

/*
 * Test whether an arc of a circle contains a point.
 * The arc is defined as the smallest one from a to b.
 */
static bool arc_contains(double a, double b, double x)
{
    // Arrange a, b and x so that the arc goes counter clockwise from a to b
    // with origin at a.
    if (fmod(b - a + 4 * M_PI, 2 * M_PI) <= M_PI) {
        x = fmod(x - a + 4 * M_PI, 2 * M_PI);
        b = fmod(b - a + 4 * M_PI, 2 * M_PI);
    } else {
        x = fmod(x - b + 4 * M_PI, 2 * M_PI);
        b = fmod(a - b + 4 * M_PI, 2 * M_PI);
    }
    return x < b;
}

static bool test_cst(const struct cst *cst, double ra, double dec)
{
    int i, n = 0;
    double a[2], b[2];

    // Test how many lines we cross when we send a line along de dec
    // coordinates up.
    for (i = 0; i < cst->n; i++) {
        memcpy(a, cst->points[i], sizeof(a));
        memcpy(b, cst->points[(i + 1) % cst->n], sizeof(b));
        if (a[0] == b[0]) continue;
        if (a[1] < dec) continue;
        if (!arc_contains(a[0], b[0], ra)) continue;
        n++;
    }
    // Special case for Ursa Minor:
    if (strcmp(cst->id, "UMI") == 0) n++;
    return n % 2 == 1;
}

static bool cache_contains(const int cache[4], int value)
{
    int i;
    for (i = 0; i < 4; i++) {
        if (cache[i] == -1) return false;
        if (cache[i] == value) return true;
    }
    return false;
}

static void add_to_cache(int cache[4], int value)
{
    int i;
    if (cache_contains(cache, value)) return;
    for (i = 3; i > 0; i--)
        cache[i] = cache[i - 1];
    cache[0] = value;
}

int find_constellation_at(const double pos[3], char id[5])
{
    const struct cst *cst;
    int i, ret;
    double pos_b1875[3];
    double ra, dec;
    // Cache of last results for faster computation.
    static int cache[4] = {-1, -1, -1, -1};

    // Rotation matrix from J2000 to 1875.0.  Computed with erfa:
    //     eraEpb2jd(1875.0, &djm0, &djm);
    //     eraPnm06a(djm0, djm, rnpb);
    const double rnpb[3][3] = {
        {0.999535020565168, 0.027962538774844, 0.012158909862936},
        {-0.027962067406873, 0.999608963139696, -0.000208799220464},
        {-0.012159993837296, -0.000131286124061, 0.999926055923052},
    };
    eraRxp(rnpb, pos, pos_b1875);
    vec3_to_sphe(pos_b1875, &ra, &dec);

    // Test the last cached values first.
    for (i = 0; i < 4; i++) {
        if (cache[i] == -1) break;
        if (test_cst(&CSTS[cache[i]], ra, dec)) {
            ret = cache[i];
            if (id) memcpy(id, CSTS[ret].id, 5);
            add_to_cache(cache, ret);
            return ret;
        }
    }

    for (i = 0; ((cst = &CSTS[i]))->id[0]; i++) {
        if (cache_contains(cache, i)) continue;
        if (test_cst(cst, ra, dec)) {
            ret = i;
            add_to_cache(cache, ret);
            if (id) memcpy(id, cst->id, 5);
            return ret;
        }
    }
    memcpy(id, "???", 4);
    return -1;
}
